Skip to content

Feat/aliases#402

Merged
pyramation merged 2 commits into
mainfrom
feat/aliases
Dec 14, 2025
Merged

Feat/aliases#402
pyramation merged 2 commits into
mainfrom
feat/aliases

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

No description provided.

Add support for using npm package names (e.g., @scope/my-module) as aliases
for control file names (e.g., my-module) in deploy, revert, verify, and tag
commands.

Changes:
- Add package-alias.ts utility with buildPackageAliasMap() and resolvePackageAlias()
- Update deploy.ts, revert.ts, verify.ts, tag.ts to resolve package aliases
- Update module-utils.ts selectPackage() to accept aliased names
- Update deployed-changes.ts to accept aliased names with cwd parameter

This is a CLI-only change that keeps core logic unchanged. Users can now use:
  pgpm deploy --package @some-scope/my-module
instead of:
  pgpm deploy --package my-module

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
Add integration tests that verify:
- Deploy using npm package name alias (@test-scope/my-first) instead of control file name
- Backward compatibility with control file names
- Deploy to specific change using aliased name
- Revert using aliased name

These tests modify the fixture's package.json to have a scoped npm name
that differs from the control file name, then verify the CLI commands
correctly resolve the alias.

Co-Authored-By: Dan Lynch <pyramation@gmail.com>
@pyramation pyramation merged commit e28c455 into main Dec 14, 2025
@pyramation pyramation deleted the feat/aliases branch December 14, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant